/**
 * 创作日历样式
 */
.creation-calendar {
  width: 100%;
}

.calendar-heatmap {
  margin: 16px 0;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 8px;
}

.weekday-label {
  text-align: center;
  font-size: 12px;
  color: rgba(0, 0, 0, 0.45);
  font-weight: 500;
}

.calendar-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 4px;
}

.calendar-day {
  aspect-ratio: 1;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  border: 1px solid #e8e8e8;
}

.calendar-day:not(.empty):hover {
  transform: scale(1.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  z-index: 1;
}

.calendar-day.empty {
  background: transparent;
  border: none;
  cursor: default;
}

.day-number {
  font-size: 11px;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.85);
}

/* 热度等级颜色 */
.calendar-day.heat-level-0 {
  background-color: #ebedf0;
}

.calendar-day.heat-level-1 {
  background-color: #c6e48b;
}

.calendar-day.heat-level-2 {
  background-color: #7bc96f;
}

.calendar-day.heat-level-3 {
  background-color: #239a3b;
}

.calendar-day.heat-level-4 {
  background-color: #196127;
}

.calendar-day.heat-level-3 .day-number,
.calendar-day.heat-level-4 .day-number {
  color: #fff;
}

/* 热度图例 */
.heat-legend {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #f0f0f0;
}

.legend-squares {
  display: flex;
  gap: 4px;
}

.legend-square {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  border: 1px solid #e8e8e8;
}

.legend-square.heat-level-0 {
  background-color: #ebedf0;
}

.legend-square.heat-level-1 {
  background-color: #c6e48b;
}

.legend-square.heat-level-2 {
  background-color: #7bc96f;
}

.legend-square.heat-level-3 {
  background-color: #239a3b;
}

.legend-square.heat-level-4 {
  background-color: #196127;
}

/* 响应式布局 */
@media (max-width: 768px) {
  .calendar-week {
    gap: 3px;
    margin-bottom: 3px;
  }

  .calendar-day {
    border-radius: 3px;
  }

  .weekday-label {
    font-size: 11px;
  }

  .day-number {
    font-size: 10px;
  }
}

@media (max-width: 576px) {
  .calendar-weekdays {
    gap: 2px;
  }

  .calendar-week {
    gap: 2px;
    margin-bottom: 2px;
  }

  .calendar-day {
    border-radius: 2px;
    border-width: 0.5px;
  }

  .weekday-label {
    font-size: 10px;
  }

  .day-number {
    font-size: 9px;
  }

  .heat-legend {
    font-size: 12px;
  }

  .legend-square {
    width: 10px;
    height: 10px;
  }
}

/* 动画效果 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.calendar-heatmap {
  animation: fadeIn 0.3s ease-in-out;
}
